﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sealight.Core.Domain
{
   public  class SpecificationAttributeEntity:BaseEntity
    {
        /// <summary>
        /// Gets or sets the specification attribute identifier
        /// </summary>
        public virtual Guid SpecificationAttributeID { get; set; }

        /// <summary>
        /// Gets or sets the name
        /// </summary>
        public virtual string Name { get; set; }

        /// <summary>
        /// Gets or sets the display order
        /// </summary>
        public virtual int DisplayOrder { get; set; }

        public virtual CategoryEntity Category { get; set; }
        public virtual Sealight.Core.DataAdapter.specification_attribute ToDataAdapter()
        {
            Sealight.Core.DataAdapter.specification_attribute data = new DataAdapter.specification_attribute { id = this.SpecificationAttributeID, name = this.Name, display_order = this.DisplayOrder};

            if (this.Category != null)
                data.CategoryId = this.Category.CategoryID;
            return data;
        }
    }
}
